package com.usian.comment.controller;

import com.usian.apis.comment.CommentLikeControllerApi;
import com.usian.comment.service.CommentLikeService;
import com.usian.model.comment.dto.CommentLikeDto;
import com.usian.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/comment")
public class CommentLikeController implements CommentLikeControllerApi {

    @Autowired
    private CommentLikeService commentLikeService;

    @Override
    @PostMapping("/like")
    public ResponseResult like(@RequestBody CommentLikeDto dto) {
        return commentLikeService.like(dto);
    }
}
